Skip to content

Initial Drupal 12 support - #126

Draft
jackrabbithanna wants to merge 3 commits into
civicrm:masterfrom
jackrabbithanna:drupal12-proto1
Draft

Initial Drupal 12 support#126
jackrabbithanna wants to merge 3 commits into
civicrm:masterfrom
jackrabbithanna:drupal12-proto1

Conversation

@jackrabbithanna

@jackrabbithanna jackrabbithanna commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

I have a working local D12/CiviCRM with:
civicrm/civicrm-core#35569
civicrm/civicrm-core#35570
civicrm/civicrm-core#35571

This PR
And a composer-compile-lib fork that just allows Symfony 8 - PR coming to that repo

See also https://lab.civicrm.org/dev/drupal/-/work_items/204

@jackrabbithanna

Copy link
Copy Markdown
Contributor Author

@demeritcowboy
I found that I could not install any other modules after CiviCRM was installed.
A couple of change records
install requirements need to be in its own object in D12
https://www.drupal.org/node/3492429
Runtime requirements need to be in the object oriented hook
https://www.drupal.org/node/3490851

I found that if hook_requirements() or hook_runtime_requirements() are present in civicrm.install, installing other modules fails.

This will be breaking changes now, so maybe we give thought to a separate branch / version for D12.
This all should be compatible with 11.2+ and D12

$requirements = [];
// modified version of _civicrm_find_civicrm() from civicrm.install
// Move to a service?
$possible_paths = [];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a service? This code is also needed in CivicrmInstallRequirements


// Modification of _civicrm_setup()
// Move to a service?
if (defined('CIVI_SETUP')) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a service? This is also needed in CivicrmInstallRequirements

@jackrabbithanna
jackrabbithanna marked this pull request as draft May 1, 2026 16:05
@jackrabbithanna

Copy link
Copy Markdown
Contributor Author

The PR for composer-compile-lib civicrm/composer-compile-lib#10

@jackrabbithanna

Copy link
Copy Markdown
Contributor Author

I created #127 to provide a more backward compatible option. It needs to be discussed, when to stop supporting Drupal 9/10, or even < 11.3 .. and be able to update this module to the latest architectural changes. If it was possible to do a separate repo for Drupal 11.3+ or 12+ .. then we could improve the module much more significantly.

@demeritcowboy

demeritcowboy commented May 14, 2026

Copy link
Copy Markdown
Contributor

My two cents is that we need to support 10 for a bit but for 9 we should have dropped it a while ago.
Secondary note is that the civi tests don't even run on 11 yet (this is a phpunit compatibility issue - https://lab.civicrm.org/dev/core/-/work_items/5944 - that's something I'd be interested in working on at the sprint).

@demeritcowboy

Copy link
Copy Markdown
Contributor

Up to you if you want to leave this open and come back to it when we're no longer supporting drupal 10-ish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants